package entity;

public class Attribute {
    private Integer attribute_id;

    private String attribute_name;

    public Attribute(Integer attribute_id, String attribute_name) {
        this.attribute_id = attribute_id;
        this.attribute_name = attribute_name;
    }

    public Attribute(String attribute_name) {
        this.attribute_name = attribute_name;
    }

    public Integer getAttribute_id() {
        return attribute_id;
    }

    public void setAttribute_id(Integer attribute_id) {
        this.attribute_id = attribute_id;
    }

    public String getAttribute_name() {
        return attribute_name;
    }

    public void setAttribute_name(String attribute_name) {
        this.attribute_name = attribute_name == null ? null : attribute_name.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", attribute_id=").append(attribute_id);
        sb.append(", attribute_name=").append(attribute_name);
        sb.append("]");
        return sb.toString();
    }
}